cmake_minimum_required( VERSION 2.8.8 )

set(RK_TEST_MOD_SRC
    rockit_common/test_mod_vpss.cpp
)

set(RK_TEST_COMMON_SRC
    rockit_common/test_comm_argparse.cpp
    rockit_common/test_comm_avs.cpp
    rockit_common/test_comm_utils.cpp
    rockit_common/test_comm_bmp.cpp
    rockit_common/test_comm_imgproc.cpp
    rockit_common/test_comm_sys.cpp
    rockit_common/test_comm_rgn.cpp
    rockit_common/test_comm_venc.cpp
    rockit_common/test_comm_vpss.cpp
    rockit_common/test_comm_vdec.cpp
    rockit_common/test_comm_ao.cpp
    rockit_common/test_comm_tde.cpp

    # add key 按键检测
    key/taiic_key.cpp
    key/stft.cpp
    # 线程池 用于多开线程
    key/threadpool.cc
    key/taiic_rknn.cpp
    key/taiic_sensor.cpp
    # socket通讯，传输音视频数据
    key/client_t.cpp

    #add yolo_post_process
    postpro/postprocess.cpp

    model/taiic_v4l2.cpp

    # model avsr 
    model/taiic_avsr.cpp
    
    #model yolo 
    model/taiic_yolo.cpp

    # opencv function
    model/taiic_opencv.cpp

    # audio mfcc feature extraction
    mfccs/taiic_mfcc_v3.cpp
    
  
    
    # model
    model/taiic_lm.cpp
    model/taiic_vsr.cpp
    
    # UART串口通信
    taiic_uart/taiic_uart_sum.cpp
    taiic_uart/server_socket.cpp
    taiic_uart/deviceIdManager.cpp
    
    # camera isp
    isp/taiic_isp_model.cpp
)


set(TAIIC_FAAD2_SRC faad2/aacToPcm.cpp)

set(TAIIC_FAAD_COMMON_SRC
    faad_common/bits.c
    faad_common/cfft.c
    faad_common/common.c
    faad_common/decoder.c
    faad_common/drc.c
    faad_common/drm_dec.c
    faad_common/error.c
    faad_common/filtbank.c
    faad_common/hcr.c
    faad_common/huffman.c
    faad_common/ic_predict.c
    faad_common/is.c
    faad_common/lt_predict.c
    faad_common/mdct.c
    faad_common/mp4.c
    faad_common/ms.c
    faad_common/output.c
    faad_common/pns.c
    faad_common/ps_dec.c
    faad_common/ps_syntax.c
    faad_common/pulse.c
    faad_common/rvlc.c
    faad_common/sbr_dct.c
    faad_common/sbr_dec.c
    faad_common/sbr_e_nf.c
    faad_common/sbr_fbt.c
    faad_common/sbr_hfadj.c
    faad_common/sbr_hfgen.c
    faad_common/sbr_huff.c
    faad_common/sbr_qmf.c
    faad_common/sbr_syntax.c
    faad_common/sbr_tf_grid.c
    faad_common/specrec.c
    faad_common/ssr.c
    faad_common/ssr_fb.c
    faad_common/ssr_ipqf.c
    faad_common/syntax.c
    faad_common/tns.c
)


set(TAIIC_RS_485_SRC
    rs_485/485_common.c
)

set(TAIIC_LR_SRC
    rk_lr/sample_smartIr.cpp
    rk_lr/taiic_rkisp.cpp
    rk_lr/sample_comm.cpp
    rk_lr/taiic_lr.cpp
)

set(TAIIC_BSA_UTILS_SRC
    rga/utils/utils.cpp
    rga/utils/allocator/dma_alloc.cpp
)

add_library(${RT_TEST_COMM_STATIC} STATIC 
    ${RK_TEST_COMMON_SRC}
    ${RK_TEST_MOD_SRC}
  
    ${TAIIC_FAAD2_SRC}
    ${TAIIC_FAAD_COMMON_SRC}

    ${TAIIC_RS_485_SRC}
    ${TAIIC_LR_SRC}
    ${TAIIC_BSA_UTILS_SRC}
    )

set_target_properties(${RT_TEST_COMM_STATIC} PROPERTIES FOLDER "rt_test_comm")
target_link_libraries(${RT_TEST_COMM_STATIC})
